diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -8,8 +8,7 @@
 #
 FDISK=/dev/fd0
 
-AS=as -32
-CC=gcc
+ASFLAGS=-32
 
 CFLAGS= -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \
 	-ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
@@ -17,7 +16,7 @@
 OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \
       config.o memsize.o error.o smp.o cpuid.o vmem.o random.o
 
-all: clean memtest.bin memtest
+all: memtest.bin memtest
 
 # Link it statically once so I know I don't have undefined
 # symbols and then link it dynamically so I have full
@@ -28,7 +27,7 @@
 	$(LD) -shared -Bsymbolic -T memtest_shared.lds -o $@ $(OBJS)
 
 memtest_shared.bin: memtest_shared
-	objcopy -O binary $< memtest_shared.bin
+	objcopy -O binary $< $@
 
 memtest: memtest_shared.bin memtest.lds
 	$(LD) -s -T memtest.lds -b binary memtest_shared.bin -o $@
@@ -44,16 +43,16 @@
 
 memtest.bin: memtest_shared.bin bootsect.o setup.o memtest.bin.lds
 	$(LD) -T memtest.bin.lds bootsect.o setup.o -b binary \
-	memtest_shared.bin -o memtest.bin
+	memtest_shared.bin -o $@
 
 reloc.o: reloc.c
-	$(CC) -c $(CFLAGS) -fno-strict-aliasing reloc.c
+reloc.o: CFLAGS += -fno-strict-aliasing
 
 test.o: test.c
-	$(CC) -c -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin -ffreestanding test.c
+test.o: CFLAGS += -O0 -fno-PIC
 
 random.o: random.c
-	$(CC) -c -Wall -march=i486 -m32 -O3 -fomit-frame-pointer -fno-builtin -ffreestanding random.c
+random.o: CFLAGS += -O3 -fno-PIC
 
 clean:
 	rm -f *.o *.s *.iso memtest.bin memtest memtest_shared \
